<template>
    <view class="data-v-02f310a9">
        <view class="data-v-02f310a9" :style="'height:' + topheight + 'rpx'"></view>
        <view class="data-v-02f310a9" :style="'margin: 0 ' + swiperModule.style.margin + 'rpx;' + 'margin-top:' + swiperModule.style.margin_top + 'rpx;'">
            <banner
                @__l="__l"
                class="data-v-02f310a9"
                dotListStyle="bottom: 90rpx;"
                :iStyle="'height: ' + (swiperModule.style.height || 650) + 'rpx;'"
                :list="swiperList"
                vueId="11512ade-1"
                v-if="$root.g0 > 0"
            ></banner>
        </view>
        <view class="content-c data-v-02f310a9" v-if="homeNum == 1">
            <view
                class="module-c data-v-02f310a9"
                :style="'margin-top:' + item.style.margin_top + 'rpx; padding: 0 ' + item.style.margin + 'rpx;'"
                v-for="(item, index) in modules"
                :key="index"
            >
                <banner
                    @__l="__l($event, { tagId: 'title_id' })"
                    class="data-v-02f310a9"
                    :iStyle="'height: ' + item.style.height + 'rpx;'"
                    id="title_id"
                    :imageStyle="'border-radius: ' + item.style.radius + 'rpx;'"
                    :list="item.list"
                    :vueId="'11512ade-2-' + index"
                    v-if="item.type === 'swiper'"
                ></banner>

                <block v-else>
                    <card-title
                        @__l="__l"
                        class="data-v-02f310a9"
                        :isShowMore="item.is_show_more"
                        :leftIcon="item.left_icon"
                        :link="item.more_link"
                        :moreText="item.more_text"
                        :title="item.title"
                        :vueId="'11512ade-3-' + index"
                        v-if="item.type === 'title'"
                    ></card-title>
                </block>

                <box-list
                    @__l="__l"
                    class="data-v-02f310a9"
                    :getNextPageCounter="getNextPageCounter"
                    :ids="item.list"
                    :module="item"
                    :refreshCounter="refreshCounter"
                    :vueId="'11512ade-4-' + index"
                    v-if="item.type === 'boxes'"
                ></box-list>

                <block v-else>
                    <product-list
                        @__l="__l"
                        class="data-v-02f310a9"
                        :getNextPageCounter="getNextPageCounter"
                        :ids="item.list"
                        :module="item"
                        :refreshCounter="refreshCounter"
                        :vueId="'11512ade-5-' + index"
                        v-if="item.type === 'products'"
                    ></product-list>
                    <block v-else>
                        <view class="data-v-02f310a9" v-if="item.type === 'activities' && item.activity_type === 'fudai'">
                            <view @tap="__e" class="homeShare data-v-02f310a9" :data-event-opts="[['tap', [['goShareActivity', ['$event']]]]]">
                                <image class="data-v-02f310a9" src="https://img121.7dun.com/yuanqimali/home/xinrenyaoqing.png"></image>
                            </view>
                            <scroll-view
                                :class="['shangbiTab', 'data-v-02f310a9', isFixed ? 'tui-sticky-fixed' : '']"
                                :enableFlex="true"
                                :scrollX="true"
                                :style="'top:' + typeTop + 'rpx' + ';'"
                            >
                                <view class="homeListClass data-v-02f310a9" v-for="(item1, i) in homeList" :key="i">
                                    <image
                                        @tap="__e"
                                        class="data-v-02f310a9"
                                        :data-event-opts="[['tap', [['hanldeActivityTypeClick', ['$0'], [[['homeList', '', i, 'selected']]]]]]]"
                                        :src="numberType == item1.selected ? item1.selectedIconPath : item1.iconPath"
                                    ></image>
                                </view>
                            </scroll-view>
                            <activity-list
                                @__l="__l"
                                class="data-v-02f310a9"
                                :getNextPageCounter="getNextPageCounter"
                                :homeNum="1"
                                :ids="item.list"
                                :module="item"
                                :modulesArr="modules"
                                :numberType="numberType"
                                :refreshCounter="refreshCounter"
                                :vueId="'11512ade-6-' + index"
                            ></activity-list>
                        </view>
                        <block v-else>
                            <coupon-list
                                @__l="__l"
                                class="data-v-02f310a9"
                                :getNextPageCounter="getNextPageCounter"
                                :ids="item.list"
                                :module="item"
                                :refreshCounter="refreshCounter"
                                :vueId="'11512ade-7-' + index"
                                v-if="item.type === 'coupons'"
                            ></coupon-list>
                            <block v-else>
                                <i-p-list
                                    @__l="__l"
                                    class="data-v-02f310a9"
                                    :getNextPageCounter="getNextPageCounter"
                                    :refreshCounter="refreshCounter"
                                    :vueId="'11512ade-8-' + index"
                                    v-if="item.type === 'ips'"
                                ></i-p-list>
                                <block v-else>
                                    <category-list
                                        @__l="__l"
                                        class="data-v-02f310a9"
                                        :module="item"
                                        :refreshCounter="refreshCounter"
                                        :vueId="'11512ade-9-' + index"
                                        v-if="item.type === 'categoryList'"
                                    ></category-list>
                                    <block v-else>
                                        <video-item @__l="__l" class="data-v-02f310a9" :module="item" :vueId="'11512ade-10-' + index" v-if="item.type === 'video'"></video-item>
                                        <block v-else>
                                            <signin-card
                                                @__l="__l"
                                                class="data-v-02f310a9"
                                                :module="item"
                                                :vueId="'11512ade-11-' + index"
                                                v-if="item.type === 'signin'"
                                            ></signin-card>
                                            <block v-else>
                                                <h-t-m-l @__l="__l" class="data-v-02f310a9" :html="item.html" :vueId="'11512ade-12-' + index" v-if="item.type === 'html'"></h-t-m-l>
                                            </block>
                                        </block>
                                    </block>
                                </block>
                            </block>
                        </block>
                    </block>
                </block>
            </view>
        </view>
        <view class="content-c data-v-02f310a9" style="background-color: #f7f7f7" v-else>
            <view
                class="module-c data-v-02f310a9"
                :style="'margin-top:' + item.style.margin_top + 'rpx; padding: 0 ' + item.style.margin + 'rpx;'"
                v-for="(item, index) in modules"
                :key="index"
            >
                <banner
                    @__l="__l"
                    class="data-v-02f310a9"
                    :iStyle="'height: ' + item.style.height + 'rpx;'"
                    :imageStyle="'border-radius: ' + item.style.radius + 'rpx;'"
                    :list="item.list"
                    :vueId="'11512ade-13-' + index"
                    v-if="item.type === 'swiper'"
                ></banner>

                <block v-else>
                    <card-title
                        @__l="__l"
                        class="data-v-02f310a9"
                        :isShowMore="item.is_show_more"
                        :leftIcon="item.left_icon"
                        :link="item.more_link"
                        :moreText="item.more_text"
                        :title="item.title"
                        :vueId="'11512ade-14-' + index"
                        v-if="item.type === 'title'"
                    ></card-title>
                    <block v-else>
                        <box-list
                            @__l="__l"
                            class="data-v-02f310a9"
                            :getNextPageCounter="getNextPageCounter"
                            :ids="item.list"
                            :module="item"
                            :refreshCounter="refreshCounter"
                            :vueId="'11512ade-15-' + index"
                            v-if="item.type === 'boxes'"
                        ></box-list>
                        <block v-else>
                            <product-list
                                @__l="__l"
                                class="data-v-02f310a9"
                                :getNextPageCounter="getNextPageCounter"
                                :ids="item.list"
                                :module="item"
                                :refreshCounter="refreshCounter"
                                :vueId="'11512ade-16-' + index"
                                v-if="item.type === 'products'"
                            ></product-list>
                            <block v-else>
                                <activity-list
                                    @__l="__l"
                                    class="data-v-02f310a9"
                                    :getNextPageCounter="getNextPageCounter"
                                    :homeNum="0"
                                    :ids="item.list"
                                    :module="item"
                                    :refreshCounter="refreshCounter"
                                    :vueId="'11512ade-17-' + index"
                                    v-if="item.type === 'activities'"
                                ></activity-list>
                                <block v-else>
                                    <coupon-list
                                        @__l="__l"
                                        class="data-v-02f310a9"
                                        :getNextPageCounter="getNextPageCounter"
                                        :ids="item.list"
                                        :module="item"
                                        :refreshCounter="refreshCounter"
                                        :vueId="'11512ade-18-' + index"
                                        v-if="item.type === 'coupons'"
                                    ></coupon-list>
                                    <block v-else>
                                        <i-p-list
                                            @__l="__l"
                                            class="data-v-02f310a9"
                                            :getNextPageCounter="getNextPageCounter"
                                            :refreshCounter="refreshCounter"
                                            :vueId="'11512ade-19-' + index"
                                            v-if="item.type === 'ips'"
                                        ></i-p-list>
                                        <block v-else>
                                            <category-list
                                                @__l="__l"
                                                class="data-v-02f310a9"
                                                :module="item"
                                                :refreshCounter="refreshCounter"
                                                :vueId="'11512ade-20-' + index"
                                                v-if="item.type === 'categoryList'"
                                            ></category-list>
                                            <block v-else>
                                                <image-list
                                                    @__l="__l"
                                                    class="data-v-02f310a9"
                                                    :module="item"
                                                    :vueId="'11512ade-21-' + index"
                                                    v-if="item.type === 'images'"
                                                ></image-list>
                                                <block v-else>
                                                    <video-item
                                                        @__l="__l"
                                                        class="data-v-02f310a9"
                                                        :module="item"
                                                        :vueId="'11512ade-22-' + index"
                                                        v-if="item.type === 'video'"
                                                    ></video-item>
                                                    <block v-else>
                                                        <pure-image-list
                                                            @__l="__l"
                                                            class="data-v-02f310a9"
                                                            :module="item"
                                                            :vueId="'11512ade-23-' + index"
                                                            v-if="item.type === 'imageList'"
                                                        ></pure-image-list>
                                                        <block v-else>
                                                            <signin-card
                                                                @__l="__l"
                                                                class="data-v-02f310a9"
                                                                :module="item"
                                                                :vueId="'11512ade-24-' + index"
                                                                v-if="item.type === 'signin'"
                                                            ></signin-card>
                                                            <block v-else>
                                                                <h-t-m-l
                                                                    @__l="__l"
                                                                    class="data-v-02f310a9"
                                                                    :html="item.html"
                                                                    :vueId="'11512ade-25-' + index"
                                                                    v-if="item.type === 'html'"
                                                                ></h-t-m-l>
                                                            </block>
                                                        </block>
                                                    </block>
                                                </block>
                                            </block>
                                        </block>
                                    </block>
                                </block>
                            </block>
                        </block>
                    </block>
                </block>
            </view>
        </view>
    </view>
</template>

<script>
import banner from '@/components/Banner/Banner';
import cardTitle from '@/components/cardTitle/cardTitle';
import boxList from '@/components/BoxList/BoxList';
import productList from '@/components/ProductList/ProductList';
import activityList from '@/components/ActivityList/ActivityList';
import couponList from '@/components/CouponList/CouponList';
import iPList from '@/components/IPList/IPList';
import categoryList from '@/components/CategoryList/CategoryList';
import signinCard from '@/components/SigninCard/SigninCard';
import hTML from '@/components/HTML/HTML';
import imageList from '@/components/PageRender/modules/ImageList';
import pureImageList from '@/components/PageRender/modules/PureImageList';
import videoItem from '@/components/PageRender/modules/Video';
import tabBar from '@/components/TabBar/tabBar';
(global.webpackJsonp = global.webpackJsonp || []).push([
    ['components/PageRender/themes/HomepageTheme'],
    {
        '042a': function (e, n, t) {},
        '3b65': function (e, n, t) {
            'use strict';

            t.r(n);
            var i = t('de53');
            var o = t('db0d');
            for (var a in o) {
                if (['default'].indexOf(a) < 0) {
                    (function (e) {
                        t.d(n, e, function () {
                            return o[e];
                        });
                    })(a);
                }
            }
            t('a9f9');
            var u = t('f0c5');
            var s = Object(u.a)(o.default, i.b, i.c, false, null, '02f310a9', null, false, i.a, void 0);
            n.default = s.exports;
        },
        a9f9: function (e, n, t) {
            'use strict';

            var i = t('042a');
            t.n(i).a;
        },
        d23d: function (e, n, t) {
            'use strict';

            (function (e) {
                Object.defineProperty(n, '__esModule', {
                    value: true
                });
                n.default = void 0;
                t('b5e5');
                var i = {
                    components: {
                        ImageList: function () {
                            t.e('components/PageRender/modules/ImageList')
                                .then(
                                    function () {
                                        return resolve(t('a3da'));
                                    }.bind(null, t)
                                )
                                .catch(t.oe);
                        },
                        PureImageList: function () {
                            t.e('components/PageRender/modules/PureImageList')
                                .then(
                                    function () {
                                        return resolve(t('12fe'));
                                    }.bind(null, t)
                                )
                                .catch(t.oe);
                        },
                        VideoItem: function () {
                            t.e('components/PageRender/modules/Video')
                                .then(
                                    function () {
                                        return resolve(t('d556'));
                                    }.bind(null, t)
                                )
                                .catch(t.oe);
                        }
                    },
                    props: {
                        homeNum: {
                            type: Number,
                            default: 0
                        },
                        refreshCount: {
                            type: Number
                        },
                        page: {
                            type: Object,
                            default: function () {
                                return {
                                    modules: []
                                };
                            }
                        },
                        refreshCounter: Number,
                        getNextPageCounter: Number
                    },
                    data: function () {
                        return {
                            typeTop: 148,
                            androidBool: false,
                            iosBool: false,
                            selectTop: 0,
                            isFixed: false,
                            topheight: 0,
                            numberType: 0,
                            homeList: [
                                {
                                    selected: 0,
                                    pagePath: '/pages/index/index',
                                    iconPath: 'https://img121.7dun.com/yuanqimali/home/quanbu.png',
                                    selectedIconPath: 'https://img121.7dun.com/yuanqimali/home/quanbu-on.png',
                                    activity_type: 'fudai'
                                },
                                {
                                    selected: 2,
                                    pagePath: '/pages/index/index',
                                    iconPath: 'https://img121.7dun.com/yuanqimali/home/yifanshang.png',
                                    selectedIconPath: 'https://img121.7dun.com/yuanqimali/home/yifanshang-on.png',
                                    activity_type: 'yifanshang'
                                },
                                {
                                    selected: 3,
                                    pagePath: '/pages/index/index',
                                    iconPath: 'https://img121.7dun.com/yuanqimali/home/malishang.png',
                                    selectedIconPath: 'https://img121.7dun.com/yuanqimali/home/malishang-on.png',
                                    activity_type: 'yifanshang'
                                },
                                {
                                    selected: 1,
                                    pagePath: '/pages/index/index',
                                    iconPath: 'https://img121.7dun.com/yuanqimali/home/wuxianshang.png',
                                    selectedIconPath: 'https://img121.7dun.com/yuanqimali/home/wuxianshang-on.png',
                                    activity_type: 'fudai'
                                },
                                {
                                    selected: 4,
                                    pagePath: '/pages/index/index',
                                    iconPath: 'https://img121.7dun.com/yuanqimali/home/lianjishang.png',
                                    selectedIconPath: 'https://img121.7dun.com/yuanqimali/home/lianjishang-on.png',
                                    activity_type: 'renyi'
                                }
                            ]
                        };
                    },
                    computed: {
                        deviceInfo: function () {
                            return this.$store.getters.deviceInfo;
                        },
                        pageModules: function () {
                            return this.page.modules || [];
                        },
                        swiperList: function () {
                            return (this.pageModules[0] && this.pageModules[0].list) || [];
                        },
                        swiperModule: function () {
                            return (
                                this.pageModules[0] || {
                                    style: {}
                                }
                            );
                        },
                        modules: function () {
                            return this.pageModules.slice(1);
                        },
                        title: function () {
                            return this.page.title || '未设置';
                        },
                        floatBtn: function () {
                            return (this.page && this.page.float_btn) || {};
                        }
                    },
                    mounted: function () {
                        var that = this;
                        switch (
                            (this.$nextTick(function () {
                                that.setSwiperHeight();
                            }),
                            e.getSystemInfoSync().platform)
                        ) {
                            case 'android':
                                console.log('运行Android上');
                                this.androidBool = true;
                                this.typeTop = 148;
                                break;
                            case 'ios':
                                console.log('运行iOS上');
                                this.iosBool = true;
                                this.typeTop = 174;
                                break;
                            default:
                                console.log('运行在开发者工具上');
                        }
                        var t = this;
                        e.$on('onPageScroll', function (e) {
                            t.isFixed = e;
                        });
                        this.topheight = this.deviceInfo.customBar;
                    },
                    watch: {
                        title: function (e) {}
                    },
                    methods: {
                        setSwiperHeight: function () {
                            var that = this;
                            setTimeout(function () {
                                e.createSelectorQuery()
                                    .in(that)
                                    .select('#title_id')
                                    .boundingClientRect(function (e) {
                                        if (null !== e.top) {
                                            if (1 == that.iosBool) {
                                                that.selectTop = e.top + 5;
                                            } else {
                                                that.selectTop = 148;
                                            }
                                        }
                                    })
                                    .exec();
                            }, 600);
                        },
                        goShareActivity: function () {
                            'invite' == this.floatBtn.link.url ||
                                e.navigateTo({
                                    url: this.floatBtn.link.path
                                });
                        },
                        hanldeActivityTypeClick: function (e) {
                            this.numberType = e;
                        }
                    }
                };
                n.default = i;
            }.call(this, t('543d').default));
        },
        db0d: function (e, n, t) {
            'use strict';

            t.r(n);
            var i = t('d23d');
            var o = t.n(i);
            for (var a in i) {
                if (['default'].indexOf(a) < 0) {
                    (function (e) {
                        t.d(n, e, function () {
                            return i[e];
                        });
                    })(a);
                }
            }
            n.default = o.a;
        },
        de53: function (e, n, t) {
            'use strict';

            t.d(n, 'b', function () {
                return o;
            });
            t.d(n, 'c', function () {
                return a;
            });
            t.d(n, 'a', function () {
                return i;
            });
            var i = {
                Banner: function () {
                    return t.e('components/Banner/Banner').then(t.bind(null, '8003'));
                },
                cardTitle: function () {
                    return t.e('components/cardTitle/cardTitle').then(t.bind(null, '9c6f'));
                },
                BoxList: function () {
                    return t.e('components/BoxList/BoxList').then(t.bind(null, 'a640a'));
                },
                ProductList: function () {
                    return t.e('components/ProductList/ProductList').then(t.bind(null, '0cf8'));
                },
                ActivityList: function () {
                    return Promise.all([t.e('common/vendor'), t.e('components/ActivityList/ActivityList')]).then(t.bind(null, 'eec7'));
                },
                CouponList: function () {
                    return t.e('components/CouponList/CouponList').then(t.bind(null, '040b'));
                },
                IPList: function () {
                    return t.e('components/IPList/IPList').then(t.bind(null, '3ff6'));
                },
                CategoryList: function () {
                    return t.e('components/CategoryList/CategoryList').then(t.bind(null, '77b7'));
                },
                SigninCard: function () {
                    return t.e('components/SigninCard/SigninCard').then(t.bind(null, '4003'));
                },
                HTML: function () {
                    return t.e('components/HTML/HTML').then(t.bind(null, 'b320'));
                }
            };
            var o = function () {
                this.$createElement;
                var e = (this._self._c, this.swiperList.length);
                this.setData(
                    Object.assign(
                        {},
                        {
                            $root: {
                                g0: e
                            }
                        }
                    )
                );
            };
            var a = [];
        }
    }
]);
(global.webpackJsonp = global.webpackJsonp || []).push([
    'components/PageRender/themes/HomepageTheme-create-component',
    {
        'components/PageRender/themes/HomepageTheme-create-component': function (e, n, t) {
            t('543d').createComponent(t('3b65'));
        }
    },
    [['components/PageRender/themes/HomepageTheme-create-component']]
]);
</script>
<style>
@import './HomepageTheme.css';
</style>
